package com.baili.healthauth.controller;

import com.baili.healthauth.service.AuthService;
import com.baili.healthcommoncore.domain.result.Result;
import com.baili.healthsystem.domain.User;
import com.baili.healthsystem.domain.request.UserRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：ShenJiaFeng
 * @Package：com.baili.healthauth.controller
 * @Project：baili-health-cloud
 * @name：AuthController
 * @Date：2024/5/26 11:27
 */
@RestController
@RequestMapping("/auth")
public class AuthController {
    @Autowired
    private AuthService authService;

    @PostMapping("/sendCode")
    public Result<User> sendCode(@RequestBody UserRequest userRequest){
        return authService.sendCode(userRequest);
    }
}
